package _05LinkedHashSet集合;

import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;

/**
 * 定义数组 int[] arr = {1,1,2,3,3,3,5,5,4}
 */
public class Test {
    public static void main(String[] args) {
        int[] arr = {1,1,2,3,3,3,5,5,4};

        HashSet<Integer> set = new LinkedHashSet<>();
        for (int i = 0; i < arr.length; i++) {
            set.add(arr[i]);

        }

        int[] newArr = new int[set.size()];
        for (Integer i :set){

        }
        System.out.println(newArr);



    }

}
